<html>
<head>
	<title><?echo $username?> - Live Support for website</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<script language="javascript" src="javascript/main.js"></script>
	<script language="javascript" src="javascript/guest.js"></script>
	<LINK href="styles/main.css" type=text/css rel=stylesheet>
</head>
<body leftmargin="0" topmargin="0">
<center>
<table width="500" border="0" cellspacing="5" cellpadding="0" class="stform">
  <tr>
  	<td align="center">
		<a href="<?echo $GLOBALS['SUPPORT_PARENT']['cWebsite']?>" target="_blank">
		<img src="<?echo getBanner()?>" width="498"  style="border:1px solid #336699" border="0"/>
		</a>
	</td>
  </tr>
  <tr>
    <td align="right">
		<div style="float:left">
			Currently in room: <b><?echo $username?></b>
		</div>
	    <input type="image" src="images/send-file-over.gif" value="File"/>
		<input type="image" src="images/send-transcript-over.gif" onClick="hasSendEmail=1" value="Email"/>
		<input type="image" src="images/print-transcript-over.gif" onClick="printdiv('displaydiv')" value="Print"/>
		<input type="image" src="images/sound-on.gif" />
		<input type="image" src="images/logout-over.gif" onClick="location.href='guest.php?opt=logout'" value="Logout"/>
	</td>
  </tr>
  <tr>
    <td>
		<div id="displaydiv" class="print" 
		style="width:500; height:200; border:1px #7F9DB9 solid; background:#ffffff;overflow:auto">
		</div>
	</td>
  </tr>
  <tr>
    <td>
		<input type="text" id="input_text" style="width:400" onKeyUp="changebut(this,'bsend')"
		onkeypress='if(event.keyCode==13)SendMessage();' />
		<input type="button" id="bsend" style="width:50" value="Send" onClick="SendMessage()" disabled="disabled"/>
		&nbsp;&nbsp;<span id="densang"></span></td>
  </tr>
</table>

<div id="formpopup"></div>

<div id="formsendmail" style="display:none">
	<div style="width:300px; padding:7px; background:#EEF5FE; border:1px solid #3B619C; margin-top:100px; margin-left:100px" align="center">
		<div>To receive this chat transcript by email, please enter your email address into the field below and click on 
		the Send button. </div>
		<div style="padding-top:7px">E-mail: <input type="text" id="toemailsend" /></div>
		<div style="padding-top:7px">
			<input type="button" onClick="sendmail()" value="Send"/>
			<input type="button" onClick="showhidepopup()" value="Cancel"/>
		</div>
	</div>
</div>

<script>
var username='<?echo $username?>';
var supportname='<?echo $_COOKIE[_NAMESITESUPPORT]?>';
var TIMEREQUEST=<?echo _TIMEREQUEST?>;
AutoCheck();
$("input_text").focus();
function showhidepopup(id)
{
	if($('formpopup').innerHTML=="")
	{
		$('formpopup').innerHTML=$(id).innerHTML;
	}else
	{
		$('formpopup').innerHTML="";
	}
}

self.resizeTo(550,475);
</script>
</center>
</body>
</html>